Page({
  data: {

  },
  onLoad: function (options) {

  },
  onReady: function () {

  },
  onShow: function () {
    wx.getSetting({
      success: function (e) {
        if (console.log("_res.authSetting['scope.userLocation']===", e.authSetting["scope.userLocation"]),
          0 == e.authSetting["scope.userLocation"]);
        else if (void 0 == e.authSetting["scope.userLocation"] || null == e.authSetting["scope.userLocation"]);
        else {
          wx.setStorageSync('sh_oil_user_pre', true)
          wx.switchTab({
            url: '/pages/index/index',
          })
          // var o = wx.getStorageSync("sh_oil_user_agent_code");
          // wx.switchTab({
          //   url: "/pages/homeRetail/homeRetail?agent_code=" + o
          // });
        }
      }
    });
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})